<?php
/**
 * @desc 文章数据层
 * @author kevin.wang
 * @date 2015-01-01 12:00:00
 */
class Edge extends Base
{
	//数据表
	protected $table = 'pert_article';
	//获取文章列表
	public function getArticleList()  
    {
		 $table = $this->table;
		 $filed = "`article_id`,`name`";
		 $sql = "select {$filed} from `{$table}` where `delete_flag` = 0 and `is_show` = 0 order by `raw_add_time` desc";
		 return $this->select_table($sql, array());
    }
	//获取文章内容
	public function getArticleContent($articleId){
		$table = $this->table;
		$sql = "select `content` from `{$table}` where `delete_flag` = 0 and `is_show` = 0 and `article_id` = :article_id";
		return $this->select_table($sql, array(':article_id' => $articleId), Base::QUERY_COLUMN);
	}
}
